package com.jd.mysql.mgr.util;

public class StringUtil {
	public static Boolean isNull(String s){
		Boolean sIsNull = false;
		if(s!=null && s.trim().length()>0){
			sIsNull = false;
		}else{
			sIsNull = true;
		}
		return sIsNull;
	}
	
	public static String getShort(String s,Integer i){
		if(!isNull(s) && i>0){
			s = s.substring(0, i>s.length()?s.length():i);
		}
		return s;
	}
}
